package com.zhixin.fans.ks.ui.dialog;

import android.app.Dialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;

import com.zhixin.fans.ks.R;
import com.zhixin.fans.ks.ui.charge.FirstChargeActivity;

import org.eenie.common.base.BaseDialogFragment;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

public class FirstChargeHintDialog extends BaseDialogFragment {
    @BindView(R.id.img_first)
    ImageView mImgFirst;
    @BindView(R.id.btn_close)
    ImageView mBtnClose;
    Unbinder unbinder;


    @Override
    public int initContentView() {
        return R.layout.dialog_first_charge_layout;
    }

    @Override
    public void initData(Bundle bundle) {


    }

    @Override
    public void initUI(View rootView) {
        unbinder = ButterKnife.bind(this, rootView);


    }

    @NonNull
    @Override
    public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
        Dialog dialog = super.onCreateDialog(savedInstanceState);
        dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
        return dialog;
    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }



    @OnClick(R.id.img_first)
    public void onMImgFirstClicked() {
        startActivity(new Intent(mContext, FirstChargeActivity.class));
        dismiss();
    }

    @OnClick(R.id.btn_close)
    public void onMBtnCloseClicked() {
        dismiss();
    }
}
